//
//  CXPhotoAsset.h
//  Asman
//
//  Created by 李旭峰 on 6/4/19.
//  Copyright © 2019 李旭峰. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Photos/Photos.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, CXAssetType) {
    CXAssetTypeMove,
    CXAssetTypeImage,
    CXAssetTypeVideo
};
@interface CXPhotoAsset : NSObject
@property (nonatomic, assign, readonly) CXAssetType type;
@property (nonatomic, strong, readonly) NSString *path;
@property (nonatomic, strong, readonly) NSString *title;
@property (nonatomic, strong, nullable) UIImage *thumbnail;
@property (nonatomic, strong, readonly) PHAsset *asset;
- (instancetype)initWithType:(CXAssetType)type path:(NSString *)path title:(NSString *)title;
- (instancetype)initWithThumbnail:(UIImage *)thumbnailImage title:(NSString *)title;
- (instancetype)initWithType:(CXAssetType)type path:(NSString *)path;
- (instancetype)initWithThumbnail:(UIImage *)thumbnailImage;
- (instancetype)initWithAsset:(PHAsset *)asset type:(CXAssetType)type;
@end

NS_ASSUME_NONNULL_END
